#!/usr/bin/env python
# -*- coding:utf-8 -*-
# 爬取搜狗首页页面数据
import requests

if __name__ == "__main__":
    # 指定url
    url = "https://www.sogou.com"
    # 发起请求
    response = requests.get(url)
    # 获取响应数据，字符串形式
    page_text = response.text
    print(page_text)
    # 持久化存储
    with open('data/sogou.html', 'w', encoding='utf-8') as fp:
        fp.write(page_text)
    print("爬取数据结束")